﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HB.HttpServer;
using HB.HttpServer.Model;

namespace Sample.Server.Filter
{
    public class AuthFilter : IAuthenticationFilter
    {
        public void OnAuthentication(ActionExecutingData e)
        {
            Console.WriteLine(e.Method.Router + "On Auth");
            //如果授权不通过，返回错误码，请求终止
            //if (*)
            //{
            //   e.ReturnCode(System.Net.HttpStatusCode.Unauthorized);
            //}
        }
    }
}
